﻿using Mengsk.ProxyDelivery.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Print.Domain.DeliveryNumberGenerator
{
    /// <summary>
    /// 单号生成
    /// </summary>
    public abstract class DeliveryNumberGenerator
    {
        /// <summary>
        /// 检查是否可以处理某个快递公司
        /// </summary>
        /// <param name="arg"></param>
        /// <returns></returns>
        public abstract bool AcceptDeliveryCompany(string arg);

        /// <summary>
        /// 生成下一个快递单号，普通的
        /// </summary>
        /// <param name="deliveryNumberAlgorithm"></param>
        /// <param name="current"></param>
        /// <returns></returns>
        public abstract string GenenrateNext(string deliveryNumberAlgorithm, string current);

        /// <summary>
        /// 生成下一个快递单号，电子版本的
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        public abstract string GenenrateOnline(Order order, string wuliuId);

        /// <summary>
        /// 生成物流编号
        /// </summary>
        /// <param name="orderIds"></param>
        /// <returns></returns>
        public abstract string GenenrateWuliuId(params string[] orderIds);

        /// <summary>
        /// 取消快递单号
        /// </summary>
        /// <param name="ph"></param>
        public abstract void CancelOnline(WuliuNumber wuliuNumber);
    }
}
